package com.dflc.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dflc.entity.po.TFileAttachmentData;
import com.dflc.entity.rep.HttpResponseEntity;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 附件信息表 服务类
 * </p>
 *
 * @author mybatis-gc
 * @since 2024-04-03
 */
public interface TFileAttachmentDataService extends IService<TFileAttachmentData> {

    HttpResponseEntity deleteFile(List<Integer> fileIds);

    /**
     * 根据文件ID更新文件业务类型和业务ID，返回影响行数
     *
     * @param businessType
     * @param businessId
     * @param fileIds
     * @return
     * @author oyt
     * @date 2025/07/20
     */
    int updateBusinessTypeAndIdById(Integer businessType, Integer businessId, List<Integer> fileIds);

    /**
     * 根据业务类型，业务ID，页面提交的ID列表，逻辑删除文件
     *
     * @param businessType
     * @param businessId
     * @param fileIds
     * @return
     * @author oyt
     * @date 2025/07/20
     */
    int deleteByIdNotIn(Integer businessType, Integer businessId, List<Integer> fileIds);

    /**
     * 根据业务类型，业务ID，返回文件列表
     *
     * @param businessType
     * @param businessId
     * @return
     * @author oyt
     * @date 2025/07/20
     */
    Map<String, Object> findByBusinessTypeAndBusinessId(Integer businessType, Integer businessId);
}
